Page({
    data: {
        genderIndex: 0,
        genders:   ['未知', '男', '女'],
        licImgURL: '',
        birthDate: '1990-01-01',
        state: "UNSUBMITTED",
        // PENDING = 1,
        // VERIFIED = 2
    },
    onLoad: function (options) {

    },
    onUploadLic(){
       console.log("你好")
        var that=this
        wx.chooseMedia({
            count: 9, // 最多可以选择的文件个数
            mediaType: ['image'], // 文件类型
            sizeType: ['original'], // 是否压缩所选文件
            sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
            success(res) {
                console.log(res.tempFiles[0].tempFilePath+"???")
                console.log(res)
               that.setData ({
                   licImgURL: res.tempFiles[0].tempFilePath
                })
            },

        })

    },
    onGenderChange(e:any){
        console.log(e.detail.value)
         this.setData({
             genderIndex: e.detail.value
         })
    },
    onBirthDateChange(e:any){
        this.setData({
            birthDate: e.detail.value
        })
    },
    onSubmit() {
       this.setData({
           state: "PENDING",
       })
        setTimeout(()=>{
           this.onVied()
        },3000);
    },

    onResubmit(){
        this.setData({
            state: "UNSUBMITTED",
            licImgURL: ''
        })
    },
    onVied(){
        this.setData({
            state: "VERIFIED"
        })
    }



});